Project and scene graph

The project’s content consists of objects organized in a scene graph and resources. The scene graph defines what is visible in the project and relations between the project’s objects. The projects is presented in the Project window and contains the following main level items:

Layers and scenes

Project content consists of layers and scenes. Layers are 2D rectangular areas that display content, organize content and receive input. See Layers.

Scenes are content for viewport layers and contain 3D content. A viewport layer can only display one scene at a time. The scene object contains scene-specific properties, such as composer and camera used for displaying the scene. See Scenes.

Showing project content in the Preview

By default, the Preview shows the project content defined under the screen object using a default preview application. You can set what the Preview shows. See Preview.

To change the visible content of the application in runtime, you can instantiate the prefabs. For example, to change the content under the screen object, you can invoke a replace action from a user action, such as a button click. The replaced item should be the current root layer under the screen. An application with multiple screens could be constructed so that each screen hierarchy would be an individual prefab object.

The Preview application configuration

A Kanzi Studio project can contain one or more applications, which is a .dll compiled from the application code. You can replace the default Preview application with the defined application configuration by setting the Preview Application property in the project properties. The application tool module must first be compiled (Visual Studio solution’s toolmodule project).

Kanzi Engine uses OpenGL ES to render the content in the Preview. In desktop environments you can render your application either with the default OpenGL 2.1 API wrappers provided with Kanzi, or a third-party emulation API. For example, an emulator can be useful for debugging shaders that may run well when compiled with desktop OpenGL, but are either not compiling, or are showing errors on the target OpenGL ES hardware.

To change the graphics API used by the Preview go to Edit > User Preferences > Advanced > Preview Graphics API. For a custom application, the graphics API is the one you selected in the solution configuration when compiling the toolmodule.

See also

Property system

Resource management

Layouts

Messages, triggers, and actions

Rendering system